﻿@using System.Security.Claims
@{
    ViewData["Title"] = "TopBar";
}

<span>欢迎来到天玺书城&nbsp;</span>
@if (User.Identity.IsAuthenticated)
{
    <span>@User.Claims.FirstOrDefault(u => u.Type == ClaimTypes.Name).Value</span>
    <span>你好！</span>
}
else
{
    <a asp-action="Login" asp-controller="User">登录</a>
    <a asp-action="Register" asp-controller="User">注册</a>
}
